package com.ccys.cms.service.corporateAndInsurance.impl;

import com.ccys.cms.service.corporateAndInsurance.PlanBenefitMemberService;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.corporateAndInsurance.PlanBenefitMemberDto;
import com.ccys.db.entity.TblPlanBenefitMember;
import com.ccys.db.mapper.TblPlanBenefitMemberMapper;
import com.ccys.db.page.PageDto;
import com.ccys.db.rely.service.impl.BaseServiceImpl;
import com.ccys.db.vo.corporateAndInsurance.PlanBenefitMemberVo;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PlanBenefitMemberServiceImpl extends BaseServiceImpl<TblPlanBenefitMember> implements PlanBenefitMemberService {

    @Resource
    private TblPlanBenefitMemberMapper mapper;
    @Override
    public ResponseResult getPage(PlanBenefitMemberDto dto) {

        PageDto.startPage();
        List<PlanBenefitMemberVo> list = mapper.getList(dto);
        PageInfo<PlanBenefitMemberVo> info = new PageInfo<>(list);
        return ResponseResult.success(info);
    }
}
